#ifndef NVPOWER_H
#define NVPOWER_H

#include <QObject>
#include <string>
#include "nvml.h"
#include <QTimer>

class NvPower : public QObject {
    Q_OBJECT
    Q_PROPERTY(QString getGpuPowerUsage READ getGpuPowerUsage NOTIFY utilChanged)
public:
    explicit NvPower(QObject *parent = nullptr);
    ~NvPower();
    QString getGpuPowerUsage() const;
private:
    void updateUtilization();
    QTimer *timer = nullptr;

Q_SIGNALS:
    void utilChanged();
};

#endif // NVPOWER_H
